Optimal. Leaf size=133 \[ \frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3560, 8, 3811}
\begin {gather*} -\frac {c+d x}{4 f \left (a^2 \coth (e+f x)+a^2\right )}+\frac {x (c+d x)}{4 a^2}-\frac {3 d}{16 f^2 \left (a^2 \coth (e+f x)+a^2\right )}+\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}-\frac {c+d x}{4 f (a \coth (e+f x)+a)^2}-\frac {d}{16 f^2 (a \coth (e+f x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3560
Rule 3811
Rubi steps
\begin {align*} \int \frac {c+d x}{(a+a \coth (e+f x))^2} \, dx &=\frac {x (c+d x)}{4 a^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}-d \int \left (\frac {x}{4 a^2}-\frac {1}{4 f (a+a \coth (e+f x))^2}-\frac {1}{4 f \left (a^2+a^2 \coth (e+f x)\right )}\right ) \, dx\\ &=-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}+\frac {d \int \frac {1}{(a+a \coth (e+f x))^2} \, dx}{4 f}+\frac {d \int \frac {1}{a^2+a^2 \coth (e+f x)} \, dx}{4 f}\\ &=-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {d}{8 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}+\frac {d \int 1 \, dx}{8 a^2 f}+\frac {d \int \frac {1}{a+a \coth (e+f x)} \, dx}{8 a f}\\ &=\frac {d x}{8 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}+\frac {d \int 1 \, dx}{16 a^2 f}\\ &=\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 114, normalized size = 0.86 \begin {gather*} \frac {\text {csch}^2(e+f x) \left (8 (d+2 c f+2 d f x)+\left (4 c f (-1+4 f x)+d \left (-1-4 f x+8 f^2 x^2\right )\right ) \cosh (2 (e+f x))+\left (4 c f (1+4 f x)+d \left (1+4 f x+8 f^2 x^2\right )\right ) \sinh (2 (e+f x))\right )}{64 a^2 f^2 (1+\coth (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.93, size = 74, normalized size = 0.56
method | result | size |
risch | \(\frac {d \,x^{2}}{8 a^{2}}+\frac {c x}{4 a^{2}}+\frac {\left (2 d x f +2 c f +d \right ) {\mathrm e}^{-2 f x -2 e}}{8 a^{2} f^{2}}-\frac {\left (4 d x f +4 c f +d \right ) {\mathrm e}^{-4 f x -4 e}}{64 a^{2} f^{2}}\) | \(74\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.38, size = 114, normalized size = 0.86 \begin {gather*} \frac {1}{16} \, c {\left (\frac {4 \, {\left (f x + e\right )}}{a^{2} f} + \frac {4 \, e^{\left (-2 \, f x - 2 \, e\right )} - e^{\left (-4 \, f x - 4 \, e\right )}}{a^{2} f}\right )} + \frac {{\left (8 \, f^{2} x^{2} e^{\left (4 \, e\right )} + 8 \, {\left (2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (-2 \, f x\right )} - {\left (4 \, f x + 1\right )} e^{\left (-4 \, f x\right )}\right )} d e^{\left (-4 \, e\right )}}{64 \, a^{2} f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 214, normalized size = 1.61 \begin {gather*} \frac {16 \, d f x + {\left (8 \, d f^{2} x^{2} - 4 \, c f + 4 \, {\left (4 \, c f^{2} - d f\right )} x - d\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} + 2 \, {\left (8 \, d f^{2} x^{2} + 4 \, c f + 4 \, {\left (4 \, c f^{2} + d f\right )} x + d\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + {\left (8 \, d f^{2} x^{2} - 4 \, c f + 4 \, {\left (4 \, c f^{2} - d f\right )} x - d\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} + 16 \, c f + 8 \, d}{64 \, {\left (a^{2} f^{2} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} + 2 \, a^{2} f^{2} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + a^{2} f^{2} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 700 vs.
\(2 (122) = 244\).
time = 0.86, size = 700, normalized size = 5.26 \begin {gather*} \begin {cases} \frac {4 c f^{2} x \tanh ^{2}{\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {8 c f^{2} x \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {4 c f^{2} x}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {12 c f \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {8 c f}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {2 d f^{2} x^{2} \tanh ^{2}{\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {4 d f^{2} x^{2} \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {2 d f^{2} x^{2}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} - \frac {5 d f x \tanh ^{2}{\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {2 d f x \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {3 d f x}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {5 d \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {4 d}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{\left (a \coth {\left (e \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 103, normalized size = 0.77 \begin {gather*} \frac {{\left (8 \, d f^{2} x^{2} e^{\left (4 \, f x + 4 \, e\right )} + 16 \, c f^{2} x e^{\left (4 \, f x + 4 \, e\right )} + 16 \, d f x e^{\left (2 \, f x + 2 \, e\right )} - 4 \, d f x + 16 \, c f e^{\left (2 \, f x + 2 \, e\right )} - 4 \, c f + 8 \, d e^{\left (2 \, f x + 2 \, e\right )} - d\right )} e^{\left (-4 \, f x - 4 \, e\right )}}{64 \, a^{2} f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.22, size = 88, normalized size = 0.66 \begin {gather*} {\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (\frac {d+2\,c\,f}{8\,a^2\,f^2}+\frac {d\,x}{4\,a^2\,f}\right )-{\mathrm {e}}^{-4\,e-4\,f\,x}\,\left (\frac {d+4\,c\,f}{64\,a^2\,f^2}+\frac {d\,x}{16\,a^2\,f}\right )+\frac {d\,x^2}{8\,a^2}+\frac {c\,x}{4\,a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________